kube-vip: add optional Prometheus metrics via Ansible variables#13229
Conversation
|
Hi @isumitsolanki. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
Nice work @isumitsolanki! Clean, backward-compatible addition with docs and a release note, and CI is all green. /approve |
|
Thank you @yankay @cyclinder |
|
Hi @yankay , @cyclinder Is there anything pending from my end. please do let me know |
|
BTW I didn't found |
Hi @tico88612 |
9090 is usually the Prometheus port; the scrape port usually depends on the specific exporter. |
|
Agree with @tico88612 — 9090 is too commonly used by other Prometheus components and can easily clash. |
|
Yeah agree @tico88612 , @yankay |
|
@isumitsolanki Please rebase and squash to one commit. And edit your PR description. |
Add kube_vip_metrics_enabled and kube_vip_metrics_port; wire prometheus_server and container port in the static pod manifest. Default metrics port to 2112 to match kube-vip upstream. Document and sample inventory updated.
78f45fb to
5790033
Compare
Hi @tico88612 , I have rebased and squash into single commit |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: isumitsolanki, tico88612, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds optional Prometheus metrics for the kube-vip static pod through Ansible variables. When
kube_vip_metrics_enabledis true, the generated manifest sets theprometheus_serverenvironment variable (fromkube_vip_metrics_port, default2112) and declares a namedmetricscontainer port so scrapers can treat the endpoint as documented. Defaults keep current behavior unchanged (kube_vip_metrics_enabled: false). Sample inventory comments anddocs/ingress/kube-vip.mddescribe how to turn the feature on.Which issue(s) this PR fixes:
Fixes #13220
Special notes for your reviewer:
The numeric
containerPortis derived withregex_replace('^.*:', '') | intso bind strings such as2112or0.0.0.0:2112map to the correct port; plain numeric values still work. The pod remainshostNetwork: true; the port declaration is mainly for documentation and tooling that read the manifest.Does this PR introduce a user-facing change?: